package com.dooioo.pns.entity.model;

import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * PackageName:com.dooioo.support.model
 * Author: Jerry.hu
 * Create: Jerry.hu (2015-04-01 下午1:40)
 * Description:
 * To change this template use File | Settings | File Templates.
 */
@Alias("message")
public class Message implements Serializable{
	public static final int MESSAGE_STATUS_DEFAULT = 1;
	public static final int MESSAGE_STATUS_READ = 2;

	private static final long serialVersionUID = -5846840401811107351L;
	/**
	 * 主键Id
	 */
	private int id;
	/**
	 * 目标appId
	 */
	private int appId;
	/**
	 * 业务方Id
	 */
	private int businessId;
	/**
	 *
	 */
	private String recipients;
	/**
	 * 消息通知提示语
	 */
	private String prompt;

	/**
	 * 创建时间
	 */
	private Date createTime;

	/**
	 * 创建时间
	 */
	private Date updateTime;
	/**
	 * 通知状态
	 */
	private int status;
	/**
	 * 目标位置
	 */
	private int touchdown;
	/**
	 * 消息备注
	 */
	private String remark;
	/**
	 * leancoud 消息记录id
	 */
	private String messageId;
	/**
	 * 消息类型分类
	 */
	private int category;
	/**
	 * 业务方扩展的字段信息
	 */
	private String extensionInfo;


	public Message(int appId, int businessId, String prompt) {
		this.appId = appId;
		this.businessId = businessId;
		this.prompt = prompt;
	}

	public Message() {
	}

	public int getBusinessId() {
		return businessId;
	}

	public void setBusinessId(int businessId) {
		this.businessId = businessId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getPrompt() {
		return prompt;
	}

	public void setPrompt(String prompt) {
		this.prompt = prompt;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getAppId() {
		return appId;
	}

	public void setAppId(int appId) {
		this.appId = appId;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getMessageId() {
		return messageId;
	}

	public void setMessageId(String messageId) {
		this.messageId = messageId;
	}

	public String getRecipients() {
		return recipients;
	}

	public void setRecipients(String recipients) {
		this.recipients = recipients;
	}

	public int getTouchdown() {
		return touchdown;
	}

	public void setTouchdown(int touchdown) {
		this.touchdown = touchdown;
	}

	public int getCategory() {
		return category;
	}

	public void setCategory(int category) {
		this.category = category;
	}

	/**
	 * 获取 业务方扩展的字段信息
	 * @return 业务方扩展的字段信息
	 */
	public String getExtensionInfo() {
		return extensionInfo;
	}

	/**
	 * 设置 业务方扩展的字段信息
	 * @param extensionInfo 业务方扩展的字段信息
	 */
	public void setExtensionInfo(String extensionInfo) {
		this.extensionInfo = extensionInfo;
	}

	@Override
	public String toString() {
		final StringBuffer sb = new StringBuffer("Message{");
		sb.append("businessId=").append(businessId);
		sb.append(", id=").append(id);
		sb.append(", appId=").append(appId);
		sb.append(", recipients='").append(recipients).append('\'');
		sb.append(", prompt='").append(prompt).append('\'');
		sb.append(", createTime=").append(createTime);
		sb.append(", updateTime=").append(updateTime);
		sb.append(", status=").append(status);
		sb.append(", touchdown=").append(touchdown);
		sb.append(", remark='").append(remark).append('\'');
		sb.append(", messageId='").append(messageId).append('\'');
		sb.append('}');
		return sb.toString();
	}

}